package tt.dz.appserver.util.enums;

/**
 * 响应
 * 
 * @author 谢龙飞
 *
 */
public enum Response {

	
	/**============================================App服务器请求响应===============================================*/
	/** succeed */
	SUCCESS("200", "请求成功"),
	/** failed */
	RUNTIME_ERROR("500", "请求失败"),
	FIAL("0", "请求失败"),
	/** no_permission */
	NO_PERMISSION("403", "资源无访问权限"),
	/**手机号码有误*/
	MOBILE_ERROR("04001", "手机号码有误"),
	/**两次密码输入不一致*/
	CONFIRM_PASSWORD_ERROR("04002", "两次密码输入不一致"),
	/**密码为空*/
	NULL_PASSWORD("04003", "密码不能为空"),
	

	/**============================================主服务器请求响应码映射 01===============================================*/
	/** 用户不存在 */
	USER_NOT_FOUND("0101001", "手机号码未注册"),
	/** 用户id或虚拟上线卡号不能为空 */
	USERID_OR_CARDNO_IS_NULL("0101002", "用户ID或卡号不能为空"),
	/** 不是企业客户 */
	IS_NOT_ENTUSER("0101003", "不是企业用户"),
	/** 用户已失效 */
	IS_NOT_VALID("0101004", "用户已失效"),
	/** 角色已经存在 */
	ROLE_EXISTS("0101005", "角色已经存在"),
	/** 操作员已经存在 */
	OPER_EXISTS("0101006", "操作员已经存在"),
	/** 角色不存在 */
	ROLE_NOT_FOUNT("0101007", "角色不存在"),
	/** 保存发现未知错误 */
	SAVE_UNKNOWN_ERROR("0101008", "保存用户发生未知错误"),
	/** 用户名密码错误 */
	BAD_PWD("0101009", "用户名或密码错误"),
	/** 用户已锁定 */
	USER_LOCKED("0101010", "用户已锁定"),
	/***/
	VERIFY_CODE_ERROR("0101011", "验证码错误"),
	/** 重复密码错误 */
	REPEAT_PWD_ERROR("0101012", "重复密码错误"),
	/** 参数校验未通过 */
	BAD_PARAM_VERIFY("0101013", "参数校验未通过"),
	/** "未设置密码 */
	NO_PASSWORD_SETTED("0101014", "未设置密码"),
	/**手机未发验证码*/
	NOT_SEND_SMS_CODE("0101015","验证码已过期"),
	/**手机未发验证码*/
	USER_EXISTS("0101016","用户已存在"),
	/**密码错误*/
	PASSWORD_ERROR("0101017","旧密码错误"),	
	/** 重复绑定  */
	  REPEAT_IS_BIND("0101302","帐号已被绑定"),
	

	
	
	/** =============================主服务器用户卡================================= */
	/** 卡不存在 */
	CARD_NOT_FOUND("0102001", "卡不存在"),
	/** 卡为激活 */
	NOT_ACTIVITY("0102002", "卡未激活"),
	/** 卡已冻结 */
	FROZED("0102003", "卡已冻结"),
	/** 卡已挂失 */
	RECORD_LOST("0102004", "卡已挂失"),
	/** 卡已注销 */
	CANCELLED("0102005", "卡已注销"),
	/** 卡已过期 */
	OVER_TIMED("0102006", "卡已过期"),
	/** 卡号为空 */
	CARD_NO_IS_NULL("0102007", "卡号为空"),
	/** 身份识别卡,卡号密码不匹配或者卡号不存在 */
	IDENTITY_CARD_UN_EXIST("0102008", "卡号密码不匹配或者卡号不存在"),
	/** 卡类型不存在 */
	CARD_TYPE_NOT_EXIST("0102009", "卡类型不存在"),
	/** 卡类型错误 */
	CARD_TYPE_ERROR("0102010", "卡类型错误"),
	/**余额不足*/
	BALANCE_NOT_ENOUGH("0102011","余额不足"),
	/**金额必须大于0*/
	CASH_MUST_GREATER_THAN_ZERO("0102012","金额必须大于0"),

	
	
	/** =============================主服务器运营商================================= */
	/** 运营商不存在 */
	PARTNER_NOT_FOUND("0103001", "运营商不存在"),
	/** 运营商必填 */
	MERCHANT_IS_REQUIRED("0103002", "运营商必填"),

	
	
	
	/** =============================主服务器交易================================= */
	/** 支付状态错误 */
	PAY_STATE_ERROR("0104001", "支付状态错误"),
	/** 保存交易信息失败 */
	SAVE_TRAN_INFO_FAIL("0104002", "保存交易信息失败"),
	/** 保存交易明细失败 */
	SAVE_TRAN_SUB_INFO_FAIL("0104003", "保存交易明细失败"),
	/** 服务编码不存在 */
	SERVICE_NOT_FOUND("0104004", "服务编码不存在"),
	/** 交易总金额和各子服务金额总和不等 */
	PAY_AMOUNT_ERROR("0104005", "交易总金额和各子服务金额总和不等"),
	/** 支付类型与用户类型不匹配 */
	PAYTYPE_NOTMATCH_USERTYPE("0104006", "支付类型与用户类型不匹配"),
	/** 支付类型与交易类型不匹配 */
	PAYTYPE_NOTMATCH_TRADETYPE("0104007", "支付类型与交易类型不匹配"),

	
	
	/** =============================主服务器渠道================================= */
	/** 支付渠道部存在 */
	CHANNEL_NOT_FOUNT("0105001", "支付渠道不存在"),
	
	


	/** =============================主服务器通用================================= */
	/** 必传参数为空 */
	PARAM_REQUIRED("0106001", "必传参数为空"),
	/** 数据格式错误 */
	FORMAT_ERROR("0106002", "数据格式错误"),
	/**手机号码格式错误*/
	MOBILE_NO_FORMAT_ERROR("0106003","手机号码格式错误"),
	/**重复发送短信*/
	REPEAT_SEND_ERROR("0106004","1分钟之内只能发送一次"),
	/** 参数过长 */
	PARAM_TOO_LARGE("0106005", "参数过长"),
	/** 系统编码不存在 */
	SYSCODE_NOT_FOUNT("0106006", "系统编码不存在"),
	/** 创建人不存在 */
	CREATEBY_NOT_FOUNT("0106007", "创建人不存在"),
	/** 参数格式错误 */
	PARAM_FORMAT_ERROT("0106008", "参数格式错误"),
	/** 发送短信发生异常 */
	MESSAGE_SEND_ERROR("0106009", "发送短信发生异常"),
	/** 保存发生异常 */
	SAVE_ERROR("0106010", "保存发生异常"),
	/** 参数不允许为负数 */
	CAN_NOT_MINUS("0106011", "参数不允许为负数"),


	/** =============================主服务器系统================================= */
	/** 系统异常 */
	COMMON_EXCEPTION("0107001", "MS系统异常"),

	
	
	
	
	/**================================OMS 02========================================*/
	STATIONQUERYEXCEPTION("0201001","站点查询异常"), 
	CHARGERQUERYNULL("0201002","无桩信息"), 
	NETWORKTIMEOUT("0201003","网络超时"), 
	HTTPUNKNOWNERROR("0201004","链接未知错误"), 
	MISSPARAM("0201005","服务器参数校验错误"), 
	MESSAGEUNKNOWNERROR("0201006","控制指令发生错误"), 
	MESSAGEMISSPARAM("0201007","控制指令缺少参数"), 
	MESSAGEPARAMTYPEERROR("0201008","控制指令类型错误"), 
	MESSAGEPARAMVALUEERROR("0201009","控制指令数值错误"), 
	MESSAGEEXECERROR("0201010","控制指令操作失败"), 
	REDISQUERYNULL("0201011","数据查询异常"), 
	THREADEXCEPTION("0201012","服务器运行异常"), 
	NULLEXCEPTION("0201013","服务器空异常"), 
	DATABASECONNECTIONEXCEPTION("0201014","数据库连接异常"), 
	REDISCONNECTIONEXCEPTION("0201015","数据服务器连接异常"), 
	MIDDLECONNECTIONEXCEPTION("0201016","中间件连接异常"), 
	TELDCONNECTIONEXCEPTION("0201017","特来电连接异常"), 
	ASCONNECTIONEXCEPTION("0201018","AS连接异常"), 
	OSCONNECTIONEXCEPTION("0201019","OS连接异常"), 
	MSCONNECTIONEXCEPTION("0201020","MS连接异常"), 
	SQLQUERYEXCEPTION("0201021","数据库查询异常"), 
	SQLEXECEXCEPTION("0201022","数据库执行异常"), 
	BESPEAKRESULTCHARGERBESPEAKED("0201023","该枪口已经被预约"), 
	CONNECTIONRESULTCHARGEREXCEPTION("0201024","该枪口已经被预约"), 
	CANCELBESPEAKRESULTNOBESPEAK("0201025","当前用户没有预约该枪口"), 
	CHARGERESULTCLOSECHARGERFAIL("0201026","关闭充电失败"), 
	STOPCHARGERESULTCONNECTIONEXCEPTION("0201027","桩出现故障"), 
	BESPEAKRESULTEXISTNOTPAYORDER("0201028","您有未支付的订单"), 
	QUERYENTERPRISEUSERNULL("0201029","查询企业用户不存在"), 
	STATION_QUERY_ERROR("0201030","站点查询异常"),
	CHARGER_QUERY_ERROR("0201031","查询不到桩"),
	OTHER_LOGIN_ERROR("0201032","用户验证失败"),
	OTHER_LOCK_ERROR("0201033","用户被锁定"),
	OL_NO_POWER_ACCESS_ERROR("0201034","没有权限访问该接口"),
	MS_RPC_ERROR("0201035","MS_RPC系统服务错误"),
	SYSTEM_ERROR("0201036","系统服务错误"),
	OTHER_LOGIN_CHANNEL_NO_ERROR("0201037","渠道号验证失败"),
	OL_REQUEST_PARAM_MISS_ERROR("0201038","第三方token认证参数缺失"),
	OL_TOKEN_OUTTIME_ERROR("0201039","第三方token已过期"),
	OL_TOKEN_AUTH_FAIL_ERROR("0201040","第三方token认证失败"),
	SESSION_TIME_OUT("0201041","网络超时"),
	HTTP_UNKNOW_ERROR("0201042","http未知错误"),
	REQUEST_PARAM_MISS_ERROR("0201043","请求参数缺失"),
	HTTP_PARAM_TYPE_ERROR("0201044","参数类型错误"),
	HTTP_PARAM_VALUE_ERROR("0201045","参数数值错误"),
	MESSAGE_UNKNOW_ERROE("0201046","报文未知错误"),
	MESSAGE_PARAM_MISS_ERROE("0201047","报文缺少参数字段"),
	MESSAGE_PARAM_TYPE_ERROE("0201048","报文参数类型错误"),
	MESSAGE_PARAM_VALUE_ERROE("0201049","报文参数数值错误"),
	MESSAGE_PARAM_OPTION_ERROE("0201050","报文操作失败"),
	JAVA_REDIS_QUERY_ERROE("0201051","redis查询不到数据"),
	JAVA_THREAD_ERROE("0201052","线程类异常"),
	JAVA_NULL_POINTER_ERROE("0201053","空指针异常"),
	JAVA_DB_CONNECTION_ERROE("0201054","数据库连接异常"),
	JAVA_REDIS_CONNECTION_ERROE("0201055","redis库连接异常"),
	JAVA_MIDDLEWARE_CONNECTION_ERROE("0201056","中间件连接异常"),
	JAVA_TELAIDIAN_CONNECTION_ERROE("0201057","特来电连接异常"),
	JAVA_AS_CONNECTION_ERROE("0201058","AS连接异常"),
	JAVA_OS_CONNECTION_ERROE("0201059","OS连接异常"),
	JAVA_MS_CONNECTION_ERROE("0201060","MS连接异常"),
	JAVA_DB_QUERY_ERROE("0201061","数据库查询异常"),
	JAVA_DB_EXEC_ERROE("0201062","数据库执行异常"),
	AS_RPC_PARAM_FORMAT_ERROR("0201063","请求参数格式错误"),
	AS_RPC_PARAM_TYPE_ERROR("0201064","请求参数类型错误"),
	AS_RPC_PARAM_EMPTY_ERROR("0201065","请求参数为空错误"),
	AS_RPC_SERVER_ERROR("0201066","系统服务不可用"),
	OTHER_LOGIN_SUCCESS("0201067","登录成功"),
	
	GET_RESERVATION_DISCOUNT_ERROR("0201068","获取预约折扣信息失败"),
	
	/**=========================OMS指令=============================*/
	UNKNOWNERROR("0201069","报文未知错误"), 
	MISSPARAMETER("0201070","报文缺少参数字段"), 
	PARAMTYPEERROR("0201071","报文参数类型错误"), 
	PARAMVALUEERROR("0201072","报文参数数值错误"),
	//新增
	CHARGERESULTDUPLICATECHARGEINSTRUCTION("0201073","该桩已被使用"),
	HAS_BEEN_LAUNCHED_THIS_OPERATION("020174","已经有人发起了此操作"),
	
	NORMAL("00000000","报文参数数值错误"), 
	OTHERFAULT("00000001","其他故障"), 
	EMERGENCYSTOP("00000002","急停故障"), 
	AMMETER("00000004","电表故障"), 
	SWITCHES("00000008","接触器故障"), 
	CARDREADER("00000010","读卡器故障"), 
	OVERTEMPERATURE("00000020","内部过温故障"), 
	CONNECTOR("00000040","连接器故障"), 
	ISOLATION("00000080","绝缘故障"), 
	OUTPUTCURRENTABNORMAL("00000100","输出电流异常"), 
	OUTPUTVOLTAGEABNORMAL("00000200","输出电压异常"), 
	CHARGERMODULE("00000400","充电机模块故障"), 
	CHARGERCOMMUNICATION("00000800","充电机通信故障"), 
	BMSPROHIBITCHARGE("00001000","BMS禁止充电"), 
	INPUTVOLTAGEABNORMAL("00002000",""),

	/**========================================================基础平台错误码 03=========================================================================**/
	
	NOT_FOUND("0301001",""),
	
	/** * 无效的token */
	INVALID_TOKEN("0301002","用户信息无效"),

	/** * 必须参数为空 */
	MISSING_PARAMETERS("0301003","参数不完整"),
	
	/** * tocken验证失败 */
	VERIFY_TOKEN_FAILED("0301004","用户验证失败"),

	/** * token过期 */
	EXPIRED_TOKEN("0301005","登录信息过期"),
	
	/** * 登录连续失败次数超规定次数，并且冷却时间还未到 */
	RETRY_LOGIN("0301006","登录错误次数过多"),

	/** * 调用主服务接口失败 */
	CONNECTION_MS_FAILED("0301007","用户访问出错");
	
	
	
	private String code;
	private String msg;

	private Response(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
}
